#pragma once

#include <windows.h>

class SoWinRenderArea;
class SoSelection;
class SoPickStyle;
class SoSeparator;
class SbName;
class SoText3;
class SoSwitch;

//namespace Ludo
//{
//	namespace Game
//	{
//		enum EPlayerId;
//	}
//
//	namespace Gui
//	{
//		using Game::EPlayerId;

		class Scene
		{
		private:
			static Scene    *s_pInstance;
			HWND             m_hWnd;
			SoWinRenderArea *m_pRenderArea;
			float            m_fAngleRotationXaxis;
			float            m_fAngleRotationYaxis;
			SoSelection     *m_pSelectionRoot;
			SoPickStyle     *m_pPickStyle;
			SoSeparator     *m_pRoot;
			SoSeparator     *m_pBoard;
			SoSeparator     *m_pAllPieces;
			SoSeparator     *m_pPiecesRoot;
			SoSeparator     *m_pSelectedPiece;
			SoText3         *m_pDieText;
			SoSwitch        *m_pDieMatSwitch;

		public:
			static Scene * getInstance(void);
			static Scene * createInstance(HWND hWnd);
			static void deleteInstance(void);

			void refresh(void);

			//SoSelection & getRoot(void);

			//void removeAllPieces(void);

			//SoSeparator * addPlayer(EPlayerId ePlayerId);

			void rotateXaxis(float fAngle);
			void rotateYaxis(float fAngle);

			void enableSelection(bool bEnable);
			void onSelectPiece(SoSeparator *pPiece);
			void onDeselectPiece(SoSeparator *pPiece);
			void selectPiece(SoSeparator *pPiece);
			void deselectPiece(SoSeparator *pPiece);
			void selectPieceByName(SbName &piece);
			void deselectPieceByName(SbName &piece);
			void confirmSelection(void);
			//SoSeparator * getSelectedPiece(void);
			void movePieceTo(SbName &piece, float x, float y, float z);
			//void setPipsOfDie(EPlayerId ePlayerId, int nPips);

		private:
			Scene(HWND hWnd);
			virtual ~Scene(void);

			void init(void);
		};
//	}
//}